package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardExpressorderCreateRequest struct {
	/*
	   物流单关联的工单List     */
	WorkcardIdList *[]int64 `json:"workcard_id_list" required:"true" `
	/*
	   erp外部物流订单号     */
	ExternalLogisticsOrderId *string `json:"external_logistics_order_id,omitempty" required:"false" `
	/*
	   真实履约服务商Nick（非ERP系统不要填写）     */
	RealTpNick *string `json:"real_tp_nick,omitempty" required:"false" `
}

func (s *TmallServicecenterWorkcardExpressorderCreateRequest) SetWorkcardIdList(v []int64) *TmallServicecenterWorkcardExpressorderCreateRequest {
	s.WorkcardIdList = &v
	return s
}
func (s *TmallServicecenterWorkcardExpressorderCreateRequest) SetExternalLogisticsOrderId(v string) *TmallServicecenterWorkcardExpressorderCreateRequest {
	s.ExternalLogisticsOrderId = &v
	return s
}
func (s *TmallServicecenterWorkcardExpressorderCreateRequest) SetRealTpNick(v string) *TmallServicecenterWorkcardExpressorderCreateRequest {
	s.RealTpNick = &v
	return s
}

func (req *TmallServicecenterWorkcardExpressorderCreateRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.WorkcardIdList != nil {
		paramMap["workcard_id_list"] = util.ConvertBasicList(*req.WorkcardIdList)
	}
	if req.ExternalLogisticsOrderId != nil {
		paramMap["external_logistics_order_id"] = *req.ExternalLogisticsOrderId
	}
	if req.RealTpNick != nil {
		paramMap["real_tp_nick"] = *req.RealTpNick
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardExpressorderCreateRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
